ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.

  # You can have the root of your site routed by hooking up '' 
  # -- just remember to delete public/index.html.
  #map.connect '', :controller => "category", :action => "show"


  map.connect '', :controller => "home"
 
	map.home 'home', :controller => 'home', :action => 'index'
	map.category 'category', :controller => 'category', :action => 'show'
	map.contact 'contact', :controller => 'articles', :action => 'contact', :id => 'contact'
	map.kontakte 'kontakte', :controller => 'articles', :action => 'contact', :id => 'kontakte'
	map.exemple 'exemple', :controller => 'articles', :action => 'show', :id => 'exemple-darticle'
	
	map.salaire 'salaire', :controller => 'articles', :action => 'show', :id => 'autour-du-salaire'
	map.coaching 'coaching', :controller => 'articles', :action => 'show', :id => 'le-coaching-pour-accomplir-votre-projet-carriere'
	map.conseil 'conseil-cv', :controller => 'articles', :action => 'show', :id => 'cv-lettre-de-motivation-vous-souhaitez-lavis-dun-expert'

  map.gehalt 'gehalt', :controller => 'articles', :action => 'show', :id => 'rund-um-ihr-gehalt…'
  map.bewerbung 'bewerbung', :controller => 'articles', :action => 'show', :id => 'wunschen-sie-die-meinung-eines-experten-uber-ihren-lebenslauf-und-ihr-anschreiben'
  map.karriere 'karriere', :controller => 'articles', :action => 'show', :id => 'personliches-coaching-um-ihren-karriereplanung-zu-optimieren'

	# default   
  # map.index '', :controller  => 'articles', :action => 'index'
  map.admin 'admin', :controller  => 'admin', :action => 'index'

	# route to cms pages
	map.connect 'admin/cms/pages/:action/:id',
		:controller => 'admin/cms/pages' , :action => nil
	
	# route to cms categories
	map.connect 'admin/cms/categories/:action/:id',
		:controller => 'admin/cms/categories' , :action => nil

	# route to cms search
	map.connect 'admin/cms/search/:action/:id',
		:controller => 'admin/cms/search' , :action => nil

	# route to user admin
	map.connect 'admin/user/user/:action/:id',
		:controller => 'admin/user/user' , :action => nil
	
	map.connect 'admin/user/roles/:action/:id',
		:controller => 'admin/user/roles' , :action => nil
		
	map.resources :articles
	map.resources :category

	# route for permalink
	# map.connect 'home/:year/:month/:day/:title',
  #  :controller => 'home', :action => 'permalink',
  #  :year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/
    
  # map.connect 'home/:title',
  #  :controller => 'home', :action => 'permalink'
    
  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)


  # Allow downloading Web Service WSDL as a file with an extension
  # instead of a file named 'wsdl'
  map.connect ':controller/service.wsdl', :action => 'wsdl'

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id'
end
